package com.xinqi.modules.homework.homework.service;

import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.Param;
import com.xinqi.common.mybatis.data.service.BaseService;
import com.xinqi.modules.homework.homework.domain.CourseHomeworkRecordEntity;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkRecordQueryDTO;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkRecordUpdateDTO;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkStudentDetailDTO;
import com.xinqi.modules.homework.homework.dto.rsp.CourseHomeworkRecordResultDTO;
import com.xinqi.modules.homework.homework.dto.rsp.CourseHomeworkStudentHistoryResultDTO;

import java.util.List;

/**
 * 作业学生提交记录表服务层
 *
 * @author: system
 * @date: 2023/03/08
 */
public interface CourseHomeworkRecordService extends BaseService<CourseHomeworkRecordEntity> {

    /**
     * 分页查询 作业学生提交记录表数据
     */
    PageInfo<CourseHomeworkRecordResultDTO> page(Param pageable, CourseHomeworkRecordQueryDTO query);

    /**
     * 查询 作业学生提交记录表数据
     */
    List<CourseHomeworkRecordResultDTO> find(CourseHomeworkRecordQueryDTO query);

    /**
     * 查询 作业学生提交记录根据作业ID、作业轮数和学生ID
     */
    CourseHomeworkRecordResultDTO findByParam(CourseHomeworkRecordQueryDTO query);

    /**
     * 查询 作业学生提交记录表数据带作业文件列表
     */
    CourseHomeworkStudentHistoryResultDTO findAll(CourseHomeworkStudentDetailDTO query);

    /**
     * 根据id查询 作业学生提交记录表数据
     */
    CourseHomeworkRecordResultDTO findById(Long id);

    /**
     * 根据id修改 作业学生提交记录表数据
     */
    Boolean updateById(CourseHomeworkRecordUpdateDTO dto);

    /**
     * 根据id修改作业学生提交记录表数据
     */
    Boolean updataByParam(CourseHomeworkRecordUpdateDTO dto);

    List<String> findHistoryComment(CourseHomeworkRecordQueryDTO dto);

    /**
     * 获取学生最后一条记录
     */
    CourseHomeworkRecordEntity getLastRecord(Long classId, Long studentId, Long contentId);


}
